package www.bwsensing.com.common.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;
import www.bwsensing.com.service.collection.database.CollectionSetService;

import javax.annotation.Resource;
/**
 * @author macos-zyj
 */
@Component
public class ApplicationStartedEventListener implements ApplicationListener<ContextRefreshedEvent> {


    @Resource
    private CollectionSetService collectionSetService;


    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        collectionSetService.checkAndStart();
    }

}
